package com.example.demo.common.lbsgeo.geo.mysql;


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * Created by li on 2016/4/22.
 */
public class JdbcUtil {
    public static Connection getConnection() throws SQLException,
            ClassNotFoundException
    {
        Class.forName("com.mysql.jdbc.Driver");

        String url = "jdbc:mysql://localhost:3306/geo";
        String username = "root";
        String password = "123456";

        Connection con = DriverManager.getConnection(url, username, password);
        return con;
    }
}
